package com.authine.cloudpivot.ext.enums;

/**
 * ArchitectureCateEnum 是临时的 以后可能改成：Architecture
 * 新架构类型 也是一种角色 一个组织 可以拥有多个架构类型
 */
public enum ArchitectureCateEnum {
    PM(0, "云平台"),
    VENDOR(1, "供应商"),
    CUSTOMER(2, "客户");

    public Number code;
    public String des;

    ArchitectureCateEnum(Number code, String des) {
        this.code = code;
        this.des = des;
    }

    public static ArchitectureCateEnum get(Integer code) {
        if (code == null) {
            return null;
        }
        for (ArchitectureCateEnum c : ArchitectureCateEnum.values()) {
            if (c.code.toString().equals(code.toString())) {
                return c;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return "code:" + code + ", des:" + des;
    }


}
